package com.work04;

public class Box {

    private boolean xiangzi;
    private int sum;
    private Object obj = new Object();

    public Box() {
        this.setSum(10);
    }

    public Box(boolean xiangzi, int sum, Object obj) {
        this.xiangzi = xiangzi;
        this.sum = sum;
        this.obj = obj;
    }

    public boolean isXiangzi() {
        return xiangzi;
    }

    public void setXiangzi(boolean xiangzi) {
        this.xiangzi = xiangzi;
    }

    public int getSum() {
        return sum;
    }

    public void setSum(int sum) {
        this.sum = sum;
    }

    public Object getObj() {
        return obj;
    }

    public void setObj(Object obj) {
        this.obj = obj;
    }

    @Override
    public String toString() {
        return "Box{" +
                "xiangzi=" + xiangzi +
                ", sum=" + sum +
                ", obj=" + obj +
                '}';
    }
}
